two input in one line python

34

multiple line input python -

lines = []
while True:
    line = input()
    if line:
        lines.append(line)
    else:
        break
text = '\n'.join(lines)

multiple lines input python -

print("Enter/Paste your content. Ctrl-D or Ctrl-Z ( windows ) to save it.")
contents = []
while True:
    try:
        line = input()
    except EOFError:
        break
    contents.append(line)

input two numbers in python in a single line -

inputs = []for i in range(3):  # loop 3 times	inputs.append(input())

Comments

Submit
0 Comments